﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;

namespace Teigha.Core
{
	public class OdGiViewportTraitsData : IDisposable
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdGiViewportTraitsData(IntPtr cPtr, bool cMemoryOwn)
		{
			this.swigCMemOwn = cMemoryOwn;
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdGiViewportTraitsData obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdGiViewportTraitsData()
		{
			this.Dispose();
		}

		public virtual void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							GlobalsPINVOKE.delete_OdGiViewportTraitsData(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
		}

		public OdGiViewportTraitsData() : this(GlobalsPINVOKE.new_OdGiViewportTraitsData(), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGiDrawable.DrawableType type()
		{
			OdGiDrawable.DrawableType result = (OdGiDrawable.DrawableType)GlobalsPINVOKE.OdGiViewportTraitsData_type(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setBackground(OdDbStub backgroundId)
		{
			GlobalsPINVOKE.OdGiViewportTraitsData_setBackground(this.swigCPtr, OdDbStub.getCPtr(backgroundId));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbStub background()
		{
			IntPtr intPtr = GlobalsPINVOKE.OdGiViewportTraitsData_background(this.swigCPtr);
			OdDbStub result = (intPtr == IntPtr.Zero) ? null : new OdDbStub(intPtr, false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setDefaultLightingOn(bool on)
		{
			GlobalsPINVOKE.OdGiViewportTraitsData_setDefaultLightingOn(this.swigCPtr, on);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool isDefaultLightingOn()
		{
			bool result = GlobalsPINVOKE.OdGiViewportTraitsData_isDefaultLightingOn(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setDefaultLightingType(OdGiViewportTraits.DefaultLightingType typ)
		{
			GlobalsPINVOKE.OdGiViewportTraitsData_setDefaultLightingType(this.swigCPtr, (int)typ);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGiViewportTraits.DefaultLightingType defaultLightingType()
		{
			OdGiViewportTraits.DefaultLightingType result = (OdGiViewportTraits.DefaultLightingType)GlobalsPINVOKE.OdGiViewportTraitsData_defaultLightingType(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setAmbientLightColor(OdCmEntityColor clr)
		{
			GlobalsPINVOKE.OdGiViewportTraitsData_setAmbientLightColor(this.swigCPtr, OdCmEntityColor.getCPtr(clr));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdCmEntityColor ambientLightColor()
		{
			OdCmEntityColor result = new OdCmEntityColor(GlobalsPINVOKE.OdGiViewportTraitsData_ambientLightColor(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setBrightness(double brightness)
		{
			GlobalsPINVOKE.OdGiViewportTraitsData_setBrightness(this.swigCPtr, brightness);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double brightness()
		{
			double result = GlobalsPINVOKE.OdGiViewportTraitsData_brightness(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setContrast(double contrast)
		{
			GlobalsPINVOKE.OdGiViewportTraitsData_setContrast(this.swigCPtr, contrast);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double contrast()
		{
			double result = GlobalsPINVOKE.OdGiViewportTraitsData_contrast(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setRenderEnvironment(OdDbStub renderEnvId)
		{
			GlobalsPINVOKE.OdGiViewportTraitsData_setRenderEnvironment(this.swigCPtr, OdDbStub.getCPtr(renderEnvId));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbStub renderEnvironment()
		{
			IntPtr intPtr = GlobalsPINVOKE.OdGiViewportTraitsData_renderEnvironment(this.swigCPtr);
			OdDbStub result = (intPtr == IntPtr.Zero) ? null : new OdDbStub(intPtr, false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setRenderSettings(OdDbStub renderSettingsId)
		{
			GlobalsPINVOKE.OdGiViewportTraitsData_setRenderSettings(this.swigCPtr, OdDbStub.getCPtr(renderSettingsId));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbStub renderSettings()
		{
			IntPtr intPtr = GlobalsPINVOKE.OdGiViewportTraitsData_renderSettings(this.swigCPtr);
			OdDbStub result = (intPtr == IntPtr.Zero) ? null : new OdDbStub(intPtr, false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setVisualStyle(OdDbStub visualStyleId)
		{
			GlobalsPINVOKE.OdGiViewportTraitsData_setVisualStyle(this.swigCPtr, OdDbStub.getCPtr(visualStyleId));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbStub visualStyle()
		{
			IntPtr intPtr = GlobalsPINVOKE.OdGiViewportTraitsData_visualStyle(this.swigCPtr);
			OdDbStub result = (intPtr == IntPtr.Zero) ? null : new OdDbStub(intPtr, false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setToneOperatorParameters(OdGiToneOperatorParameters arg0)
		{
			GlobalsPINVOKE.OdGiViewportTraitsData_setToneOperatorParameters(this.swigCPtr, OdGiToneOperatorParameters.getCPtr(arg0));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void toneOperatorParameters(OdGiToneOperatorParameters arg0)
		{
			GlobalsPINVOKE.OdGiViewportTraitsData_toneOperatorParameters__SWIG_0(this.swigCPtr, OdGiToneOperatorParameters.getCPtr(arg0));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGiToneOperatorParameters toneOperatorParameters()
		{
			OdGiToneOperatorParameters result = (OdGiToneOperatorParameters)Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdGiViewportTraitsData_toneOperatorParameters__SWIG_1(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public static bool compareToneOps(OdGiToneOperatorParameters op1, OdGiToneOperatorParameters op2)
		{
			bool result = GlobalsPINVOKE.OdGiViewportTraitsData_compareToneOps(OdGiToneOperatorParameters.getCPtr(op1), OdGiToneOperatorParameters.getCPtr(op2));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool IsEqual(OdGiViewportTraitsData data2)
		{
			bool result = GlobalsPINVOKE.OdGiViewportTraitsData_IsEqual(this.swigCPtr, OdGiViewportTraitsData.getCPtr(data2));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool IsNotEqual(OdGiViewportTraitsData data2)
		{
			bool result = GlobalsPINVOKE.OdGiViewportTraitsData_IsNotEqual(this.swigCPtr, OdGiViewportTraitsData.getCPtr(data2));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		private object locker = new object();

		private HandleRef swigCPtr;

		protected bool swigCMemOwn;
	}
}
